<template>
  <div>
    <h1>要桑记事本</h1>
    <input type="text" v-model="name" />
    <button @click="fn">添加任务</button>
  </div>
</template>
<script>
export default {
  name: '',

  data () {
    return {
      name: '',
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    fn () {
      this.$emit('ddd', {
        id: Date.now(),
        name: this.name
      })
    }
  }
}
</script>
<style lang='less'  scoped>
// .TodoHeader {
//   background-color: red;
// }
</style>
